
       PROGRAM-ID. ARITHMETIC.
      *> Adds two Java Integers and displays the result.
       CONFIGURATION SECTION.
       REPOSITORY.
           CLASS J-INTEGER  AS "java.lang.Integer"
           CLASS CALCULATOR AS "Calculator"
           .
       DATA DIVISION.
       WORKING-STORAGE SECTION.
       01  INT-1 OBJECT REFERENCE J-INTEGER.
       01  INT-2 OBJECT REFERENCE J-INTEGER.
       01  INT-3 OBJECT REFERENCE J-INTEGER.
       PROCEDURE DIVISION.
           SET INT-1 TO J-INTEGER:>new(5)
           SET INT-2 TO J-INTEGER:>new(10)
           SET INT-3 TO CALCULATOR:>addIntegers(INT-1, INT-2)
           DISPLAY INT-1 " + " INT-2 " = " INT-3
           GOBACK.
